package com.zhl.emp_manage.service;

import com.zhl.emp_manage.entity.Meeting;
import com.zhl.emp_manage.mapper.MeetingMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MeetingService {

    @Autowired
    private MeetingMapper meetingMapper;

    //查看所有会议
    public List<Meeting> getList() {
        return meetingMapper.getList();
    }

    //根据id查询会议
    public Meeting getOne(Integer id) {
        return meetingMapper.getOne(id);
    }

    //添加会议
    public boolean addMeeting(Meeting meeting) {
        return meetingMapper.addMeeting(meeting);
    }

    //根据id删除会议
    public boolean deleteMeeting(Integer id) {
        return meetingMapper.deleteMeeting(id);
    }

    //根据会议名称模糊查询
    public List<Meeting> getListLike(String name) {
        return meetingMapper.getListLike(name);
    }

    //修改会议
    public boolean updateMeeting(Meeting meeting) {
        return meetingMapper.updateMeeting(meeting);
    }

    //分页查询
    public List<Meeting> getMeetingMore(Integer page, Integer limit) {
        return meetingMapper.getList();
    }
}
